/**************************************************************************************
**user define functions in main file
**2017.07.12
***************************************************************************************/
#include "userMain.h"
/***************************************************************************************
*** main Initial Function
****************************************************************************************/
uint8_t userSystemTestFlag=0;
void userMainInit(void)
{
    userSystemInitFunc();
    userClockMainTimerInitFunc();
    userClockSubTimerInitFunc();
    userKeypadInitFunc();
    userLedInitFunc();
    userIrInitFunc();
    //userIrDecodeFunc();
    //userIRreceInitFunc();
    
    userTestInitFunc();
    userSystemTestFlag = 1;
    userLedSelfTest();
    userSystemTestFlag = 0;
    userUartDmaInitFunc();
    userBeepInitialFunc();
}

void userMainLoop(void)
{
    userTestActionFunc();
    //userUartDmaProcessFunc();
    userUartRxCtrlFunc();
    userSendLearnCodeIR();
    userResetKeyScan();
#ifdef USER_KEYPAD
    userShotrLongKeyFunc(AKeySe,&VAKeySe);
    userShotrLongKeyFunc(BKeySe,&VBKeySe);
    
#endif
}

/******************END OF FILE *******************/
